package com.ljkj.blockpay.ui.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.ljkj.blockpay.R;
import com.ljkj.blockpay.basedata.BaseActivity;
import com.ljkj.blockpay.databinding.ActivityCurrencyDetailBinding;
import com.ljkj.blockpay.presenter.CurrencyDetailPresenter;
import com.ljkj.blockpay.util.ToggleToActivity;
import com.ljkj.blockpay.widget.ClickListener;

/**
 * 币种详情页面
 */
public class CurrencyDetailActivity extends BaseActivity<ActivityCurrencyDetailBinding,CurrencyDetailPresenter> implements ClickListener {

    @Override
    public int initContentView() {
        return R.layout.activity_currency_detail;
    }

    @Override
    protected void initData() {
        super.initData();
        binding.setOnClick(this::onClick);
        binding.tvTitle.setRightText(R.string.dealhistory);
        binding.tvTitle.setTitleContent(R.string.BTC);
        binding.tvTitle.setLeftBackFinish(this);
        binding.tvTitle.setRightTextListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(CurrencyDetailActivity.this,MainActivity.class);
                intent.putExtra("id",1);
                startActivity(intent);
            }
        });

    }


    @Override
    protected CurrencyDetailPresenter createPresenter() {
        return null;
    }

    @Override
    protected void init(Bundle savedInstanceState) {

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.rl_recharge:
                ToggleToActivity.toRechargeActivity(this);
                break;
            case R.id.rl_withdraw:
                ToggleToActivity.toCashActivity(this);
                break;
            case R.id.rl_transfer:
                ToggleToActivity.toTransferActivity(this);

                break;
            case R.id.rl_receipt:
                ToggleToActivity.toReceiptActivity(this);
                break;

        }
    }
}